﻿@model GameSchool.Models.ViewModels.AssignmentViewModel       
           
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<!--<meta http-equiv="PRAGMA" content="NO-CACHE"/>-->
<div class="StudentCourseStuff">
@using (Html.BeginForm("GetAssignment", "Student", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>@Model.Assignment.Name</legend>

        @Html.HiddenFor(model => model.Assignment.Name)
        @Html.HiddenFor(model => model.Assignment.ID)
        @Html.HiddenFor(model => model.Assignment.LevelID)
        @Html.HiddenFor(model => model.Assignment.Points)
        @Html.HiddenFor(model => model.Assignment.CourseID)

        <p>@Model.Assignment.Description</p>

        <div class="editor-label">
            @Html.LabelFor(model => model.File)
        </div>
        <div class="editor-field">
            <input type="file" name="File" id="File" />
            @Html.ValidationMessageFor(model => model.File)
        </div>


        <p>
            <input class="SaveChanges" type="submit" value="Vista" />
        </p>
    </fieldset>
}


    @Html.ActionLink("Til baka", "GetCourse/" + Model.Assignment.CourseID)
</div>
